Release 10.1A: OpenEdge Development:
ProDataSets
The NEXT-ROWID attribute
The
NEXT-ROWIDattribute is of data-typeROWID, and is supported for each buffer in a Data-Source.
NEXT-ROWIDis set by Progress whenever aFILLis done. If theBATCH-SIZEattribute is not set for the Data-Source buffers, or theFILLcompletes the source query selection without running into aBATCH-SIZElimitation,NEXT-ROWIDis set to the Unknown value (?). If theFILLruns into aBATCH-SIZElimitation,NEXT-ROWIDis set to theRowIDof the next record in the selection for that source buffer. If there are multiple source buffers for a single ProDataSet row, then theNEXT-ROWIDattribute is set for each of them. It is accessed through the Data-Source handle by specifying the buffer sequence number or buffer name, as shown:
The
buffer-sequence-numberis anINTEGERthat represents the sequence number of the desired buffer. Thebuffer-nameis aCHARACTERexpression that evaluates to the name of a buffer in the data-source object. If nobuffer-sequence-numberorbuffer-nameis given, the attribute defaults to the first (or only) buffer in the Data-Source.Like
LAST-BATCH,NEXT-ROWIDis intended for a temp-table that is either at the top of a ProDataSet relation hierarchy, or has at most one parent record at each level above the buffer that it applies to. This is because the attribute value is set only once for each buffer in eachFILL. If a singleFILLrequires batching for children of multiple different parents, the value ofNEXT-ROWIDis set for each one in turn, so that the final value reflects only theNEXT-ROWIDfor the children of the last parent retrieved. If there is a need to captureNEXT-ROWIDfor multiple sets of dependent records during theFILL, then some other event handler is needed – for example anAFTER-ROW-FILLevent procedure for the parent buffer, which can then storeNEXT-ROWIDinto an array or some other field where is can later be retrieved and dealt with programmatically.The
NEXT-ROWIDattribute is read-write. The default is the Progress the Unknown value (?) value.NEXT-ROWIDis read/write because an application procedure may need to setNEXT-ROWIDitself if the code is not using theFILLmethod, but instead is reading the source data from a flat file or some other unmanaged data store. Otherwise, this attribute is normally set by Progress and not by the application.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |